package com.clk.desktop.gui.components.basic;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public abstract class ClkFrame extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	// ---------------------------------------------------------------------------------
	public ClkFrame() {
		super();
		initGUI();
		setLocationToCentre();
	}

	// ---------------------------------------------------------------------------------
	private void initGUI() {
		setUndecorated(true);
		getContentPane().setLayout(null);
		setSize(new Dimension(677, 412));
	}

	// ---------------------------------------------------------------------------------
	public void setLocationToCentre() {
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension frameSize = this.getSize();
		int x = (screenSize.width - frameSize.width) / 2;
		int y = (screenSize.height - frameSize.height) / 2;
		this.setLocation(x, y);
	}
	// ---------------------------------------------------------------------------------
}
